import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

import '../../../util/ImConstant.dart';

class DocumentViewPage extends StatelessWidget {

  final String title;
  final String filePath;

  const DocumentViewPage({ required this.title, required this.filePath, super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: _buildAppBar(context),
        backgroundColor: ImConstant.IM_MAIN_BACKGROUND_COLOR,
        // body: PowerFileViewWidget(
        //     filePath: filePath
        // )
      body: Text('111')
    );
  }

  AppBar _buildAppBar(BuildContext context) {
    return AppBar(
      backgroundColor: ImConstant.IM_MAIN_BACKGROUND_COLOR,
      leading: GestureDetector(
        child: const Icon(Icons.chevron_left, color: Colors.black),
        onTap: () => Navigator.of(context).pop(),
      ),
      centerTitle: true,
      title: Text(
        title,
        style: const TextStyle(color: Colors.black, fontSize: ImConstant.IM_DEFAULT_SIZE),
      ),
    );
  }

}